package web.weibo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import web.weibo.model.Session;
import web.weibo.model.User;

import java.util.ArrayList;

@Mapper
@Repository
public interface MapperUser {

    ArrayList<User> users();

    User currentUser(String username);

    int isUser(String username);

    int isPassword(String password);

    ArrayList<Session> sessions(String sessionId);

    void session(String sessionId, String username);

    void exit(String username);

    void user(int id, String note, String username, String password, String role, String salt, String avator);

    void updatePassword(String newpassword, String salt, String username);

    void avator(String avatorname, int userId);
}
